<?php

use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use app\modules\lenders\models\Combox;
use yii\jui\DatePicker;
use backend\widgets\inputGroupSearch\InputGroupSearch;

//\backend\assets\CheckBoxAsset::register($this);
\backend\assets\SearchAsset::register($this);
/* @var $this yii\web\View */
/* @var $model app\modules\sysConfig\models\search\SmsSearch */
/* @var $form yii\bootstrap\ActiveForm */
//echo $model->phones;
//echo $model->body;
?>

<div class="sms-search">

    <?php
    $form = ActiveForm::begin([
                'action' => ['send'],
                'method' => 'get',
    ]);
    ?>

    <div class="col-sm-4">
        <?= $form->field($model, 'smsType')->dropDownList(Combox::getComboxName('短信类型')) ?>
    </div>
        <div class="col-sm-4 lender_username">
            <?= $form->field($model, 'lender_userName') ?>
        </div>
    
        <div class="col-sm-4 borrower_username">
            <?= $form->field($model, 'borrower_userName') ?>
        </div>
        <div class="col-sm-4 lender_companyname">
            <?=
            $form->field($model, 'lender_companyName')->widget(InputGroupSearch::className(), [
                'name' => 'companyNameQuery', //button 每个脚本里要唯一
                'redirectUrl' => Yii::$app->urlManager->createUrl(['groups/group/groups_search']), //url
                'libName' => 'companyDialogCustInput', //每个脚本里要唯一
                'backFunction' => 'successCallback', //回调函数 每个脚本里要唯一
                'dialogTitles' => '投资部门', //dialog标题
                'trashFunction' => 'trashCallback',
                'options' => ['readonly' => "readonly"],
                'inputName' => 'smssearch-' . 'lender_companyname'
            ])
            ?>
        </div>

        <div class="col-sm-4">
            <?= $form->field($model, 'lender_phone') ?>
        </div>
        <div class="col-sm-4 lender_idtype">
            <?= $form->field($model, 'lender_IDType')->dropDownList(Combox::getComboxName('证件类型'), ['prompt' => '--请选择--']) ?>
        </div>
        <div class="col-sm-4">
            <?= $form->field($model, 'lender_identityNo') ?>
        </div>
        <div class="col-sm-4">
            <?=
                    $form->field($model, 'lender_strcreateTime')->
                    widget(DatePicker::className(), ['dateFormat' => 'yyyy-MM-dd'])
            ?>
        </div>
        <div class="col-sm-4">
            <?=
                    $form->field($model, 'lender_endcreateTime')->
                    widget(DatePicker::className(), ['dateFormat' => 'yyyy-MM-dd'])
            ?>
        </div>

        <div class="col-sm-4 lender_customerManagerName">
            <?= $form->field($model, 'lender_customerManagerName') ?>
        </div>


        <div class="col-sm-4">
            <?= $form->field($model, 'lender_accountStatus')->dropDownList(Combox::getComboxName('开户状态'), ['prompt' => '--请选择--']) ?>
        </div>
        <input type="hidden" id ="search_sms" value="<?= $model->phones; ?>">
        <input type="hidden" id ="search_body" value="<?= $model->lender_count; ?>">
        <?php // $form->field($model, 'lender_body')->hiddenInput()->label(false) ?>

    <div class="form-group-butons btnSub">
        <?= Html::submitButton('查询', ['class' => 'btn btn-primary', 'id' => 'btnQuery']) ?>
        <?= Html::resetButton('重置', ['class' => 'btn btn-default']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
